﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AFDS.Core;
using AFDS.Core.Base;

namespace AFDS_WEB {
    public class Class1 : IScript {
        private string _name;
        private double _version;

        public Class1() {
            _name = "Test";
            _version = 1.26;
            AFDS.Core.Site.Serving += new EventHandler<AFDS.Core.SiteServingEventArgs>(Site_Serving);
            AFDS.Web.Engine.AFDSView.Serving += new EventHandler<AFDSViewServingArgs>(AFDSView_Serving);
        }

        void AFDSView_Serving(object sender, AFDSViewServingArgs e) {
            //Change the title
            //System.Web.Mvc.ViewPage page = e.Page;
            //page.ViewData["Title"] = "Changing title from script";
        }

        void Site_Serving(object sender, AFDS.Core.SiteServingEventArgs e) {
            System.Web.UI.HtmlControls.HtmlGenericControl ww = e.Descriptcion;
            //ww.InnerHtml += "Test from plugin";
        }
        public void Make() {
        }


        #region IScript Members

        public string Name {
            get {
                return _name;
            }
            set {
                _name = value;
            }
        }

        public double Version {
            get {
                return _version;
            }
            set {
                _version = value;
            }
        }

        #endregion

        #region IDisposable Members

        public void Dispose() {
            throw new NotImplementedException();
        }

        #endregion
    }
}
